<script>
    LinkifyBehavior = {
      _uberify: function(url) {
        let u = new URL(url);
        if (u.hostname.includes('build.chromium.org')) {
          u.hostname = 'uberchromegw.corp.google.com';
          u.pathname = u.pathname.replace('/p/', '/i/');
        }
        if (u.hostname !== 'go') {
          u.protocol = 'https:';
        }
        return u.toString();
      },

      _linkify: function(linkStyle, url) {
        if (linkStyle === 'uber') {
          return this._uberify(url);
        }
        return url;
      }
    };
</script>
